---
title: Raster image to PDF
summary: Draw a single raster image (GIF/JPEG/PNG) into a single-page PDF.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-17
library: PdfAPI.SyncFusionCore
reference_type: package
operation_id: OP-SFC-007
trigger: Called by ConverterFactory for gif/jpg/jpeg/png extensions
---

# Raster image to PDF

Converts a single raster image stream to a single-page PDF, stretching the image to fill the full page client area.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-SFC-007 |
| **Trigger** | Called by [Execute a single conversion (converter template)](execute-single-conversion.md) via `ImageConverter.ConvertItem`, dispatched from [Convert a source document to PDF](convert-source-document-to-pdf.md) for `gif`/`jpg`/`jpeg`/`png` |
| **Inputs** | Source `Stream`, `ConvertRequest` |
| **Outputs** | PDF `byte[]` |
| **Primary components** | `ImageConverter.ConvertItem` |
| **Entry point** | `PdfApi.SyncFusionCore\Convert\ImageConverter.cs` |

## Steps

1. Choose conformance (`Pdf_A1B` / `None`) and create the `PdfDocument` ([BR-SFC-011](../business-rules.md#br-sfc-011-pdf%2Fa-conformance-level-a1b)).
2. Add exactly one page and read its client size ([BR-SFC-016](../business-rules.md#br-sfc-016-single-image-produces-single-page)).
3. Load the stream as a `PdfBitmap` and draw it into a rectangle equal to the full page size —
   aspect ratio is not preserved ([BR-SFC-017](../business-rules.md#br-sfc-017-image-and-frame-stretched-to-full-page)).
4. Save to a `MemoryStream`, close the document, and return the bytes.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["ConvertItem called<br>with stream, request"]) --> Conf["Choose conformance,<br>create PdfDocument"]
	Conf --> AddPage["Add one page,<br>read client size"]
	AddPage --> LoadBmp[Load stream as PdfBitmap]
	LoadBmp --> Draw["Draw image into full<br>page rectangle"]
	Draw --> Save["Save to MemoryStream,<br>close document"]
	Save --> Return([Return PDF bytes])
```

## Failure and edge-case behavior

- Any Syncfusion conversion failure surfaces as an exception, which is caught by
  [Execute a single conversion (converter template)](execute-single-conversion.md) and turned into a failed `PdfResult` rather than propagated here.
- The source image's aspect ratio is not preserved; the image is stretched to the page's full
  client rectangle.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `PdfApi.SyncFusionCore\Convert\ImageConverter.cs`
